package com.sidifensen.domain.constants;

/**
 * @author sidifensen
 * @since 2025-07-08
 */
public class BlogConstants {

    public static final String NotFoundUser = "该用户不存在";
    public static final String ExistUser = "该用户已存在";
    public static final String UserDisabled = "账号被禁用";
    public static final String ExistUserName = "用户名已存在";
    public static final String ExistEmail = "邮箱已存在";
    public static final String NotFoundEmail = "邮箱不存在";
    public static final String EmailNotMatch = "邮箱不匹配";
    public static final String CheckCodeError = "验证码错误";
    public static final String LoginRequired = "请先登录";
    public static final String LoginExpired = "登录已过期，请重新登录";
    public static final String NewPasswordSameAsOld = "新密码不能与原密码相同";
    public static final String UserIdRequired = "用户ID不能为空";
    public static final String UpdateUserInfoError = "更新用户信息失败";

    public static final String CannotGetRequestInfo = "无法获取请求信息";
    public static final String IllegalRequest = "非法请求";

    public static final String NotFoundRole = "角色不存在";
    public static final String NotFoundMenu = "菜单不存在";
    public static final String NotFoundPermission = "权限不存在";
    public static final String NotAdminAccount = "不是管理后台账户";
    public static final String ExistRoleMenu = "角色菜单已存在";
    public static final String ExistRolePermission = "角色权限已存在";
    public static final String ExistUserRole = "用户角色已存在";

    public static final String NotFoundAlbum = "相册不存在";
    public static final String CannotHandleOthersAlbum = "不能操作别人的相册";
    public static final String CannotHandleOthersPhoto = "不能操作别人的照片";
    public static final String NotFoundPhoto = "照片不存在";
    public static final String ExamineStatusError = "审核状态错误";

    public static final String SaveMessageError = "消息保存失败";
    public static final String ReadMessageError = "消息读取失败";
    public static final String DeleteMessageError = "消息删除失败";
    public static final String MarkMessageAsReadError = "标记消息已读失败";

    public static final String AddTagError = "添加标签失败";
    public static final String DeleteTagError = "删除标签失败";
    public static final String UpdateCategorySortError = "更新分类排序失败";
    public static final String CategoryNotFound = "分类不存在";
    public static final String CategoryNameRequired = "分类名称不能为空";
    public static final String SortValueRequired = "排序值不能为空";
    public static final String AddArticleError = "添加文章失败";
    public static final String DeleteArticleError = "删除文章失败";
    public static final String CannotHandleOthersArticle = "不能操作别人的文章";
    public static final String UpdateArticleError = "更新文章失败";
    public static final String NotFoundArticle = "文章不存在";
    public static final String NotFoundTag = "标签不存在";

    public static final String NotFoundColumn = "专栏不存在";
    public static final String CannotHandleOthersColumn = "不能操作别人的专栏";
    public static final String AddColumnError = "添加专栏失败";
    public static final String UpdateColumnError = "更新专栏失败";
    public static final String DeleteColumnError = "删除专栏失败";
    public static final String ExamineColumnError = "审核专栏失败";
    public static final String BatchExamineColumnError = "批量审核专栏失败";
    public static final String BatchDeleteColumnError = "批量删除专栏失败";
    public static final String ColumnIdsEmpty = "专栏ID列表不能为空";
    public static final String ColumnIdEmpty = "专栏ID不能为空";
    public static final String ArticleNotInColumn = "文章不在该专栏中";
    public static final String RemoveArticleFromColumnError = "从专栏中移除文章失败";

    // 评论相关错误信息
    public static final String NotFoundComment = "评论不存在";
    public static final String NotFoundParentComment = "父评论不存在";
    public static final String CannotReplyUnApprovedComment = "无法回复未审核通过的评论";
    public static final String AddCommentError = "评论发表失败";
    public static final String CannotDeleteOthersComment = "无权限删除此评论";
    public static final String DeleteCommentError = "评论删除失败";
    public static final String ArticleIdRequired = "文章ID不能为空";
    public static final String CommentIdRequired = "评论ID不能为空";
    public static final String CommentExamineStatusError = "审核状态错误";
    public static final String CommentAuditError = "审核失败";
    public static final String CommentDeleteError = "评论删除失败";
    public static final String UpdateArticleCommentCountError = "更新文章评论数失败";

    // 点赞相关错误信息
    public static final String LikeTypeError = "点赞类型错误";
    public static final String UpdateArticleLikeCountError = "更新文章点赞数失败";
    public static final String UpdateCommentLikeCountError = "更新评论点赞数失败";

    // 阅读记录相关错误信息
    public static final String UpdateArticleReadCountError = "更新文章阅读数失败";
    public static final String SaveReadRecordError = "保存阅读记录失败";
    public static final String GetUserHistoryError = "获取用户浏览历史失败";
    public static final String ClearUserHistoryError = "清除用户浏览历史失败";
    public static final String GetHotArticleListError = "获取热门文章列表失败";

    // 收藏夹相关错误信息
    public static final String NotFoundFavorite = "收藏夹不存在";
    public static final String CannotHandleOthersFavorite = "不能操作别人的收藏夹";
    public static final String CannotAccessPrivateFavorite = "无权限访问私密收藏夹";
    public static final String AddFavoriteError = "添加收藏夹失败";
    public static final String UpdateFavoriteError = "更新收藏夹失败";
    public static final String FavoriteNameRequired = "收藏夹名称不能为空";
    public static final String AddArticleToFavoriteError = "添加文章到收藏夹失败";
    public static final String FavoriteIdRequired = "收藏夹ID不能为空";
    public static final String ArticleAlreadyInFavorite = "文章已在该收藏夹中";
    public static final String UpdateFavoriteArticleCountError = "更新收藏夹文章数失败";
    public static final String ArticleNotInFavorite = "文章不在该收藏夹中";
    public static final String RemoveArticleFromFavoriteError = "从收藏夹中移除文章失败";
    public static final String UpdateArticleCollectCountError = "更新文章收藏数失败";

    // 关注相关错误信息
    public static final String CannotFollowSelf = "不能关注自己";
    public static final String FollowError = "关注失败";
    public static final String UnfollowError = "取消关注失败";
    public static final String FollowedUserIdRequired = "被关注用户ID不能为空";

    // 友链相关错误信息
    public static final String NotFoundLink = "友链不存在";
    public static final String CannotHandleOthersLink = "不能操作别人的友链";
    public static final String AddLinkError = "申请友链失败";
    public static final String DeleteLinkError = "删除友链失败";
    public static final String LinkNameRequired = "网站名称不能为空";
    public static final String LinkUrlRequired = "网站地址不能为空";
    public static final String LinkDescriptionRequired = "网站描述不能为空";
    public static final String LinkEmailRequired = "网站邮箱不能为空";
    public static final String LinkIdRequired = "友链ID不能为空";
    public static final String GetLinkListError = "获取友链列表失败";

    // 限流相关错误信息
    public static final String RateLimitExceeded = "操作繁忙，请稍候再试";
    public static final String BlacklistedUser = "您的访问已被限制，请稍后再试";

    // 黑名单相关错误信息
    public static final String NotFoundBlacklist = "黑名单记录不存在";
    public static final String UserIdsRequired = "用户ID列表不能为空";
    public static final String BlacklistReasonRequired = "拉黑原因不能为空";
    public static final String BlacklistExpireTimeRequired = "到期时间不能为空";
    public static final String BlacklistIdRequired = "黑名单ID不能为空";
    public static final String AddBlacklistError = "添加黑名单失败";
    public static final String UpdateBlacklistError = "更新黑名单失败";
    public static final String DeleteBlacklistError = "删除黑名单失败";
    public static final String BlacklistIdsRequired = "黑名单ID列表不能为空";

    // 访客日志相关错误信息
    public static final String VisitorLogIdsRequired = "访客日志ID列表不能为空";
    public static final String QueryDaysMustGreaterThanZero = "查询天数必须大于0";
    public static final String QueryDaysCannotExceed365 = "查询天数不能超过365天";

    // 登录日志相关错误信息
    public static final String LoginLogIdsRequired = "登录日志ID列表不能为空";
    public static final String DeleteLoginLogError = "删除登录日志失败";

    // 友链相关错误信息（补充）
    public static final String SearchLinkError = "搜索友链失败";
    public static final String LinkAuditError = "友链审核失败";
    public static final String LinkAuditListRequired = "友链审核信息列表不能为空";
    public static final String BatchAuditLinkError = "批量审核友链失败";
    public static final String LinkIdsRequired = "友链ID列表不能为空";
    public static final String BatchDeleteLinkError = "批量删除友链失败";

    // OAuth相关错误信息
    public static final String OauthLoginError = "OAuth登录失败";

    // AI相关错误信息
    public static final String AiDailyLimitExceeded = "今日AI调用次数已达上限，请明天再试";
    public static final String AiContentTooShort = "文章内容过短（少于100字），无需AI生成摘要";
    public static final String AiContentEmpty = "文章内容不能为空";
    public static final String AiDuplicateRequest = "请勿重复提交相同内容";
    public static final String AiExtractSummaryError = "AI提取摘要失败";

    // 私信相关错误信息
    public static final String NotFoundPrivateMessage = "私信不存在";
    public static final String CannotRevokeOthersMessage = "不能撤回别人的消息";
    public static final String MessageRevokeTimeExpired = "消息发送超过2分钟，无法撤回";
    public static final String MessageAlreadyRevoked = "消息已被撤回";
    public static final String NotFoundConversation = "会话不存在";
    public static final String RevokedMessage = "撤回了一条消息";

    // 通用错误信息
    public static final String ParamError = "参数错误";
    public static final String SystemInternalError = "系统内部错误";

    // 系统通知消息模板（评论、点赞、收藏、关注）
    /**
     * 评论通知消息模板
     * 
     * @param nickname     评论者昵称
     * @param articleTitle 文章标题
     */
    public static String CommentNotification(String nickname, String articleTitle) {
        return String.format("%s 评论了你的文章《%s》", nickname, articleTitle);
    }

    /**
     * 回复通知消息模板
     * 
     * @param nickname     回复者昵称
     * @param articleTitle 文章标题
     */
    public static String ReplyNotification(String nickname, String articleTitle) {
        return String.format("%s 回复了你在《%s》中的评论", nickname, articleTitle);
    }

    /**
     * 点赞文章通知消息模板
     * 
     * @param nickname     点赞者昵称
     * @param articleTitle 文章标题
     */
    public static String LikeArticleNotification(String nickname, String articleTitle) {
        return String.format("%s 点赞了你的文章《%s》", nickname, articleTitle);
    }

    /**
     * 点赞评论通知消息模板
     * 
     * @param nickname 点赞者昵称
     */
    public static String LikeCommentNotification(String nickname) {
        return String.format("%s 点赞了你的评论", nickname);
    }

    /**
     * 收藏文章通知消息模板
     * 
     * @param nickname     收藏者昵称
     * @param articleTitle 文章标题
     */
    public static String CollectArticleNotification(String nickname, String articleTitle) {
        return String.format("%s 收藏了你的文章《%s》", nickname, articleTitle);
    }

    /**
     * 关注通知消息模板
     * 
     * @param nickname 关注者昵称
     */
    public static String FollowNotification(String nickname) {
        return String.format("%s 关注了你", nickname);
    }
}
